home *** CD-ROM | disk | FTP | other *** search
/ Explorer - Mosaic & Web / Explorer - Mosaic & Web.iso / helpers / ghostvew / src / gvc.doc < prev    next >
Encoding:
Text File  |  1994-08-02  |  46.3 KB  |  1,322 lines

  1. 1Overview
  2. ?Overview
  3. W
  4.  `GSview for Windows` is a graphical interface for MS-Windows `Ghostscript`.
  5. P
  6.  `PM GSview` is a graphical interface for OS/2 `Ghostscript`.
  7. E
  8.  Ghostscript is an interpreter for the PostScript page description language
  9.  used by laser printers.
  10.  For documents following the Adobe PostScript Document Structuring
  11.  Conventions,
  12.  GSview allows selected pages to be viewed or printed.
  13.  GSview can be used with Ghostscript 3.0 or later.
  14.  GSview was inspired by Tim Theisen's X11 Ghostview program.
  15. 2Installation
  16. ?Installation
  17.  First you need to install Ghostscript 3.0.
  18.  This version of GSview will not work with earlier versions of Ghostscript.
  19.  
  20.  Next install
  21. P
  22.  PM GSview by copying gvpm.exe and gvpm.hlp
  23. W
  24.  GSview for Windows by copying gsview.exe, gsview32.exe and gsview.hlp
  25. E
  26.  to your Ghostscript directory.
  27.  
  28.  Start GSview then select `Options` | `Ghostscript Command`,
  29.  and enter the correct executable path and include path for Ghostscript.
  30.  For example
  31. P
  32.    c:\gs\gsos2.exe -Ic:\gs;c:\psfonts
  33. W
  34.    c:\gs\gswin.exe -Ic:\gs;c:\gs\fonts
  35. E
  36.  
  37.  It is essential that you get both the executable and the include path
  38.  correct otherwise GSview will either complain that it cannot run
  39. P
  40.  gsos2,
  41. W
  42.  gswin,
  43. E
  44.  or it will start and then immediately exit with an
  45.  error code.
  46.  
  47.  Set the environment variable TEMP to point to a directory for
  48.  temporary files.  For example:
  49.    SET TEMP=c:\temp
  50.  The directory must exist and must be writeable.
  51.  
  52.  If you have some Type 1 fonts on your system, it may be possible to
  53.  tell Ghostscript to use them.  See `Fontmap.os2` and `Fontmap.atm`
  54.  supplied with Ghostscript for examples.
  55.  
  56.  If you have problems, try reading the help topic `Common Problems`.
  57.  
  58.  To uninstall GSview, remove the files you installed above, then remove
  59. P
  60.  c:\os2\gvpm.ini
  61. W
  62.  c:\windows\gsview.ini
  63. E
  64.  from the appropriate system directory.
  65. 2Document Structuring Conventions
  66. ?Document Structuring Conventions
  67. ?DSC
  68. ?Encapsulated PostScript
  69. ?EPSF
  70. ?EPS
  71.  Adobe has defined a set of extended comment conventions that provide
  72.  additional information about the page structure and resource
  73.  requirements of a PostScript file.
  74.  If a file contains these Document Structuring Convention (DSC) comments,
  75.  GSview can display pages in random order using `Goto Page` and display pages
  76.  in reverse order using `Previous Page`.  Selected pages can be extracted to
  77.  another file or printed.
  78.  
  79.  If a file does not contain DSC comments, GSview can only
  80.  display the pages in the original order.
  81.  
  82.  DSC conforming files start with the comment line:
  83.   %!PS-Adobe-3.0
  84.  where the number 3.0 may change and is the DSC version number.
  85.  Some programs write PostScript files with a control-D as the first
  86.  character of the file, followed by the comment line mentioned above.
  87.  GSview will correctly report that these files are not DSC conforming,
  88.  but will still display them with page selection features available.
  89.  Complain to the author of the program that produced the PostScript file.
  90.  To make the file DSC conforming, edit it to remove the control-D character.
  91.  
  92.  DSC conforming files contain lines such as:
  93.   %%Pages: 24
  94.   %%Page: 1 1
  95.  These lines tell GSview how many pages a document contains and
  96.  where they start.  GSview uses this information to select
  97.  individual pages.
  98.  
  99.  Encapsulated PostScript Files (EPSF) are single page documents
  100.  that contain a subset of the `DSC` comments and PostScript commands.
  101.  EPS files start with the comment line:
  102.   %!PS-Adobe-3.0 EPSF-3.0
  103.  EPS files are commonly used for inclusion in other documents and
  104.  for this reason require the bounding box comment:
  105.    %%BoundingBox: llx lly urx ury
  106.  where llx, lly, urx and ury are integers giving the x and y coordinates
  107.  of the lower left and upper right corners of a bounding box which encloses
  108.  all marks made on the page.
  109.  
  110.  Some EPS files contain a preview of the PostScript document.
  111.  This preview can be a Windows Metafile, a TIFF file, or an Interchange
  112.  preview (EPSI format).
  113.  For the Windows Metafile or TIFF file preview, the EPS file under DOS
  114.  contains a binary header which specifies the location and lengths of
  115.  the preview and PostScript language sections of the EPS file.
  116.  For the Interchange format, the preview is contained in DSC comments
  117.  starting with
  118.   %%BeginPreview: width height depth lines
  119.  An EPS file with a preview can be created from an EPS file without a
  120.  preview using `Add EPS Preview`.
  121. 2Opening a Document
  122. ?File
  123. ?Open
  124. ?Select File
  125. ?Close
  126.  The `Open` command on the `File` menu opens a file and displays
  127.  the first page.
  128.  
  129.  If the file contains `DSC` comments, pages can be selected using
  130.  `Next Page`, `Previous Page` and `Goto Page`.
  131.  
  132.  If the file does not contain `DSC` comments, `Previous Page` and `Goto Page`
  133.  will not work.  Another file should not be selected until a last page of
  134.  the file has been displayed.
  135.  
  136.  When a file is open, GSview will display the document filename,
  137.  the current page (if available) and while the cursor is over
  138.  the image, the location of the cursor in coordinates specified
  139.  by `Options` | `Units`.  The coordinate can be PostScript points
  140.  (1/72"), millimetres or inches.
  141.  The cursor location is useful for calculating bounding boxes.
  142.  
  143.  The `Select File` command is similar to `Open` but it does not display
  144.  the document.
  145.  This command is useful for opening a document prior to printing it.
  146.  
  147.  The `Close` command closes the currently open document.
  148.  This should be used before the current file is changed by another
  149.  program.
  150.  If you do not do this and GSview detects that the file length or date
  151.  have changed, it will close Ghostscript and rescan the document.
  152.  
  153.  See also `Print`.
  154. 2Page Selection
  155. ?Page Selection
  156. ?Next Page
  157. ?Previous Page
  158. ?Redisplay
  159. ?Goto Page
  160.  `Next Page` moves to the next page of a document.
  161.  This works even if the document does not contain `DSC` comments.
  162.  
  163.  `Previous Page` moves to the previous page.
  164.  
  165.  `Redisplay` redisplays the current page.
  166.  
  167.  `Goto Page` shows a dialog box which allows selection of the next page
  168.  number to display.  The `Select Page` dialog box shows page labels
  169.  since these are likely to be more useful than a sequential page number.
  170.  
  171.  The `Previous Page`, `Redisplay` and `Goto Page` commands work only if the
  172.  document contains `DSC` comments.
  173. 2Zoom
  174. ?Zoom
  175.  To enlarge a displayed feature, position the cross-hair mouse pointer
  176.  over the feature then press the right mouse button.
  177.  The window will swap from normal display resolution to zoom
  178.  resolution and the status line will have the word `Zoomed` appended to it.
  179.  The zoomed feature will be in the centre of the window.
  180.  To cancel `Zoom`, press the right mouse button again or select
  181.  any command that redraws the page (e.g. `Redisplay`, `Next Page`).
  182.  By default the zoom resolution is 300 dots per inch but this can
  183.  be changed with the `Media` | `Zoom Resolution` command.
  184.  
  185.  `Zoom` will only work for `DSC` conforming documents.
  186. 2Document Information
  187. ?Info
  188.  A brief information area at the top of the window is used by
  189.  GSview to display the document filename, the current page number
  190.  and label (if available) and while the cursor is over the image, the
  191.  location of the cursor in coordinates specified by `Options` | `Units`.
  192.  The cursor location is useful for calculating bounding boxes.
  193.  
  194.  The `Info` command on the `File `menu shows a dialog box with the
  195.  following information about the `DSC` comments in the current document.
  196.  
  197.  `File `is the full pathname to the document.
  198.  
  199.  `Type` is` DSC`,` EPS`, `No DSC comments` or 'Ignoring DSC Comments'.
  200.  `EPS` is an Encapsulated PostScript File - a single page document
  201.  that contains a subset of the `DSC` comments and PostScript commands.
  202.  `EPS `files are commonly used for inclusion in other documents.
  203.  `Ignoring DSC Comments` is displayed if `Options` | `Ignore DSC`
  204.  is selected.
  205.  
  206.  `Title` is a text title that can be used when printing banner
  207.  pages and for routing or recognising documents.
  208.  
  209.  `Date` is the time the document was created.
  210.  
  211.  `BoundingBox` specifies a box that encloses all the marks painted
  212.  on the page.  The four integer values are the coordinates of the
  213.  lower left and upper right corners of the bounding box in default
  214.  user coordinates (1/72 inch).
  215.  
  216.  `Orientation `is either `Portrait `or` Landscape`.
  217.  
  218.  `Default Media` gives the media name followed by the width and
  219.  height of that media in default user coordinates (1/72 inch).
  220.  
  221.  `Page Order` is either `Ascending`, `Descending` or `Special`
  222.  
  223.  `Pages` is the total number of pages in the document.
  224.  
  225.  `Page` gives the page label and page number.
  226.  
  227.  `Bitmap `is the size of the display bitmap in pixels which may be
  228.  useful if you are copying the displayed image to the clipboard.
  229. 2Printing
  230. ?Print
  231. ?Print To File
  232. ?Print File
  233. ?Extract
  234.  The `Print` command on the `File `menu allows printing of the document
  235.  using Ghostscript.
  236.  The Ghostscript printer driver and resolution are selected using the
  237.  `Select Device` dialog box.   Pages are selected using the `Select Pages`
  238.  dialog box.  The `All`, `Odd` and `Even` buttons provide quick selection
  239.  of pages.
  240.  
  241. W
  242.  The `mswinprn` printer driver uses the windows printer drivers
  243.  and should work with any printer with raster capabilities.
  244.  Printer resolution cannot be selected from within GSview; use
  245.  the Control Panel instead.  This driver is very slow and should
  246.  be considered a last resort if no other Ghostscript printer
  247.  driver is available.
  248.  
  249.  With all other printer drivers, Ghostscript sends the output direct
  250.  to the printer, without passing through a Windows printer driver.
  251.  If you have trouble printing you may have to `Print To File`
  252.  and then `Print File` or use the DOS command `COPY /B FILENAME PRN`.
  253.  
  254.  The Win32s versions of GSview and Ghostscript can't send output
  255.  directly to a printer port so an attempt is made to pass the output
  256.  unchanged through a Windows printer driver.  This does not work
  257.  with some Windows printer drivers.  Use 'Print To File' if you
  258.  have problems.
  259. E
  260.  
  261.  This list of available devices and resolutions is stored in the
  262.  [Devices] section of
  263. W
  264.  gsview.ini.
  265. P
  266.  gvpm.ini.
  267. E
  268.  The default list of devices and resolutions is taken from the
  269.  standard distribution version of Ghostscript 3.0 and may not
  270.  be complete.
  271.  
  272.  To print a document without displaying it, open the document
  273.  using `Select File`.
  274.  
  275.  `Print To File` is similar to the `Print` command except that Ghostscript
  276.  will write the output to a file instead of sending it to a printer.
  277.  
  278.  If you want to produce a bitmap, some useful drivers are
  279.  `bmpmono`, `bmp16`, `bmp16m` and `bmp256`.
  280.  
  281.  `Print File` sends a file to a local port, bypassing the
  282. W
  283.  Windows
  284. P
  285.  Presentation Manager
  286. E
  287.  printer drivers.
  288.  This is useful for sending a document to a PostScript printer,
  289.  or for sending an output file produced by Ghostscript to a printer.
  290.  
  291.  `Extract` allows a range of pages to be copied from the current
  292.  document to a new document.  For example, ten pages can be extracted
  293.  from the middle of the current document and written to another file,
  294.  which will later be sent to a printer.
  295. 3Properties
  296. ?Properties
  297.  Some printer drivers allow extra properties to be specified.
  298.  If two sections are added to the
  299. W
  300.  gsview.ini
  301. P
  302.  gvpm.ini
  303. E
  304.  file for these printer
  305.  drivers, GSview will enable the `Properties` button which will
  306.  display the `Edit Properties` dialog box.
  307.  The following example shows how to add property information
  308.  for the cdjcolor driver.
  309.  First add a section which gives the current values.
  310.  This section, after the first character is removed, gives the options
  311.  that will appear in the `Property` list box.
  312.  The first character is `s` for string or `d` for number.
  313.   [cdjcolor]
  314.   dBitsPerPixel=24
  315.   dDepletion=1
  316.   dShingling=2
  317.   dBlackCorrect=4
  318.  
  319.  Next add a section which gives the values to display in the
  320.  `Value` list box.
  321.   [cdjcolor values]
  322.   dBitsPerPixel=1,3,8,16,24
  323.   dDepletion=1,2,3
  324.   dShingling=0,1,2
  325.   dBlackCorrect=0,1,2,3,4,5,6,7,8,9
  326.  GSview will also add the value `[Not defined]` to the listbox.
  327.  
  328.  When you press the `OK` button in the `Edit Properties` dialog
  329.  box, the current settings are written to the
  330. W
  331.  gsview.ini
  332. P
  333.  gvpm.ini
  334. E
  335.  file.
  336.  
  337.  When GSview prints a file, it will give Ghostscript the contents
  338.  of the [cdjcolor] section of
  339. W
  340.  gsview.ini
  341. P
  342.  gvpm.ini
  343. E
  344.  as follows:
  345.   -dBitsPerPixel=24 -dDepletion=1 -dShingling=2 -dBlackCorrect=3
  346.  If the value of a property is `[Not defined]`, that property will
  347.  not be sent to Ghostscript.
  348.  
  349.  Some entries for the cdj family of drivers are supplied in the
  350.  property.ini file that comes with GSview.
  351. 3PS to EPS
  352. ?PS to EPS
  353.  In general, it is not possible to convert a PostScript file to `EPS`.
  354.  However, many single page PostScript files can be converted to `EPS`
  355.  by changing the first line of the file to
  356.   %!PS-Adobe-3.0 EPSF-3.0
  357.  and then adding or fixing up the `%%BoundingBox` comment.
  358.  
  359.  `When used incorrectly, the PS to EPS command can produce PostScript
  360.  files with incorrect DSC comments.  Such a document will cause problems
  361.  when you try to include it inside another document.`
  362.  
  363.  To convert a PostScript file to `EPS`, the original file `must` be
  364.  a `single page` document.  If the document contains `DSC` comments
  365.  and is multi page, extract the desired page with `File` | `Extract`.
  366.  If the document does not contain `DSC` comments, you will need to
  367.  edit the file by hand to extract the desired page.
  368.  
  369.  `EPS` documents `must not` use any of the following operators:
  370.   banddevice   clear         cleardictstack  copypage
  371.   erasepage    exitserver    framedevice     grestoreall
  372.   initclip     initgraphics  initmatrix      quit
  373.   renderbands  setglobal     setpagedevice   setpageparams
  374.   setshared    startjob      letter          note
  375.   legal        a3            a4              a5
  376.  
  377.  The following operators should be used with care:
  378.   nulldevice   setgstate     sethalftone    setmatrix
  379.   setscreen    settransfer   setcolortransfer
  380.  
  381.  It is `your` responsibility to make sure that the above requirements
  382.  are met.
  383.  
  384.  To test if a document contains any of the above operators, select
  385.  `Options` | `EPS Warn` and then `Open` the desired document.
  386.  After the page has been displayed, look in the Ghostscript text window.
  387.  If any of the above operators have been used you should see lines like:
  388.   Warning: EPS files must not use ...
  389.  If you find these warnings then do `not` use `PS to EPS`.
  390.  Remember to turn off `EPS Warn` afterwards.
  391.  
  392.  A document must be displayed before `PS to EPS` is used.
  393.  The document must contain a `showpage`.
  394.  This is required so that the bounding box can be measured.
  395.  
  396.  For documents without `DSC` comments, `PS to EPS` allows a bounding
  397.  box to be specified, then writes out an `EPS` file consisting of
  398.  an `EPS` wrapper around the original document.
  399.  
  400.  For documents with `DSC` comments, `PS to EPS` will change the
  401.  first line of the file to
  402.   %!PS-Adobe-3.0 EPSF-3.0
  403.  then allows the `%%BoundingBox` comment to be changed or added.
  404.  
  405.  For `EPS` documents, `PS to EPS` allows the `%%BoundingBox` comment to
  406.  be changed.
  407.  
  408.  `PS to EPS` does not clip the document to the `%%BoundingBox`.
  409.  To do so would require changing the PostScript code itself.
  410.  `PS to EPS` only changes the `DSC` comments.
  411.  
  412.  `PS to EPS` does not add a preview to a document.
  413.  If you want a preview you add it with `Edit` | `Add EPS Preview` after
  414.  first creating an `EPS` file with a correct `%%BoundingBox`.
  415.  
  416.  See also `Add EPS Preview`, `Extract`, `EPS Warn`.
  417. 2Text Extract and Find
  418. ?Text Extract and Find
  419. ?Text
  420. ?Text Extract
  421. ?Search
  422. ?Find
  423. ?Find Next
  424.  In general, extracting text from a PostScript document is not a
  425.  trivial operation.  Words may be broken.  Text may be encoded.
  426.  Ligatures may be used (e.g replacing 'fi' with a single character).
  427.  There may be no relationship between the location of a word in
  428.  the PostScript file and its location on the page.
  429.  
  430.  However, it is common for PostScript documents to contain text in the
  431.  same order as it appears on the page, and for it to be given in
  432.  PostScript strings, surrounded by parentheses.  Complete lines
  433.  may be given in one string, or one word per string.  For this sort
  434.  of document, extracting text can be done with reasonable success.
  435.  
  436.  `Edit` | `Text Extract` will extract text contained in strings from
  437.  specified pages and write it to a text file.
  438.  Line breaks in this text file correspond to lines in the document.
  439.  Spaces in the text file correspond to spaces within strings, or to
  440.  separate strings.  A more effective method of extracting text is to
  441.  use ps2ascii.ps supplied with Ghostscript.
  442.  
  443.  `Edit` | `Find` will search for text and display the first
  444.  page that contains the text.  `Find` asks for a search text
  445.  and a range of pages in which to search.
  446.  The preceeding comments about extracting text from a PostScript
  447.  document should be noted.  `Find` first extracts text from
  448.  the document, then searches it ignoring all spaces in both the
  449.  document and the search text.  Case is ignored when searching.
  450.  Consequently the search text `these` would match both `These`
  451.  and `The serial`.  No information is given about where the word
  452.  is located on a given page because this information is not
  453.  available without a complete PostScript interpreter.
  454.  
  455.  `Edit` | `Find Next` will continue the search from the next page.
  456. 2Clipboard
  457. ?Clipboard
  458. ?Edit
  459. ?Copy
  460. ?Paste To
  461. ?Convert Bitmap
  462. ?Bitmap
  463. ?Add EPS Preview
  464. ?Extract EPS
  465.  The GSview window can be copied to the Clipboard as a bitmap
  466.  by selecting `Copy` from the `Edit` menu.
  467. W
  468.  The bitmap may be a Device Independent Bitmap or it may be a Device
  469.  Dependent Bitmap, depending on how Ghostscript was compiled.
  470.  The default for Ghostscript 3.0 is a Device Independent Bitmap
  471.  (BMP format).
  472. E
  473.  
  474.  An alternative way to get a bitmap output from Ghostscript is
  475.  to use one of the BMP drivers.  See `Print`.
  476.  
  477. W
  478.  `Paste To` copies a Device Independent Bitmap from the Clipboard
  479.  (if available) to a BMP file.
  480.  
  481.  `Convert Bitmap` converts between a Device Independent Bitmap and
  482.  a Device Dependent Bitmap.
  483.  If the clipboard contains a Device Independent Bitmap (BMP format),
  484.  this is converted to a Device Dependent Bitmap and added to the clipboard.
  485.  If the clipboard does not contain a colour palette, one is created
  486.  from the Device Independent Bitmap and added to the clipboard.
  487.  This option is present because some applications (notably Windows
  488.  Paintbrush) won't recognise a Device Independent Bitmap in the clipboard.
  489. P
  490.  `Paste To` copies the currently displayed image (if available)
  491.  to a BMP file.
  492. E
  493.  
  494.  `Add EPS Preview` takes a bitmap from the
  495. W
  496.  clipboard
  497. P
  498.  display
  499. E
  500.  and uses it to add a preview to an EPS file.
  501.  `Add EPS Preview` can create a DOS EPS file with a
  502. W
  503.  Windows Metafile or
  504. E
  505.  TIFF preview, or an EPSI file with an Interchange preview.
  506.  To use the `Add EPS Preview` command the following steps must be followed.
  507.  
  508.  1. Make sure the document has a correct bounding box.
  509.  A bounding box can be added or changed using `File` | `PS to EPS`.
  510.  
  511.  2. Select `Orientation` | `Portrait`.
  512.  
  513.  3. Select `Options` | `EPS Clip`.
  514.  This will cause Ghostscript to use a display window the size of the
  515.  bounding box instead of the page size.
  516.  
  517.  4. Select `Media` | `Resolution` and set a suitable resolution
  518.  for the preview.  If the resolution is too high
  519. W
  520.  the bitmap may not fit in the clipboard, or will
  521. P
  522.  it
  523. E
  524.  make the EPS file excessively large.
  525.  
  526.  5. `Open` an EPS file that does not contain a preview.
  527.  
  528. W
  529.  6. Select `Edit` | `Copy`.  This tells Ghostscript to copy the
  530.  display bitmap to the Clipboard.  This allows GSview to access
  531.  the bitmap in the next step.
  532.  
  533.  7.
  534. P
  535.  6.
  536. E
  537.  Select `Edit` | `Add EPS Preview`, then the preview format,
  538.  then the new EPS filename.  GSview will write a new file containing
  539.  the original PostScript EPS file and a preview created from the
  540. W
  541.  bitmap in the clipboard.
  542. P
  543.  display bitmap.
  544. E
  545.  The available preview formats are `Interchange`,
  546. W
  547.  `TIFF 4`, `TIFF 5` and `Windows Metafile`.
  548. P
  549.  `TIFF 4` and `TIFF 5`.
  550. E
  551.  If adding an Interchange preview, the document must have an `%%EndComments`
  552.  line, otherwise GSview may put the preview in the wrong place.
  553.  A TIFF 5 preview is a Class B image with no compression as described
  554.  in Appendix G of the TIFF 5.0 memorandum.  A TIFF 4 preview is almost
  555.  identical to the TIFF 5 preview, but avoids using tags which are not
  556.  described in the TIFF 4 specifiation.
  557.  WordPerfect 5.1 requires a TIFF 4 preview.
  558.  
  559. W
  560.  8.
  561. P
  562.  7.
  563. E
  564.  Reset `Orientation` | `Portrait`, `Options` | `EPS Clip`
  565.  and `Media` | `Resolution` to their previous values.
  566.  
  567.  To extract the PostScript or Preview section from a DOS EPS
  568.  file, use `File` | `Select File` followed by `Edit` | `Extract EPS`
  569.  then `PostScript` or `Preview`.
  570.  
  571.  See also `PS to EPS`.
  572. 2Options
  573. ?Options
  574.  The `Options` menu has the following selections:
  575. 3Ghostscript Command
  576. ?Ghostscript Command
  577.  The `Ghostscript Command` option allows selection of the command
  578.  to use when executing Ghostscript.
  579.  A default will be constructed using the GSview path and
  580.  will look like:
  581. W
  582.   gswin -Ic:\gs;c:\gs\fonts
  583. P
  584.   gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  585. E
  586.  GSview will first attempt to find Ghostscript in the GSview
  587.  directory and then will try the PATH.
  588.  If GSview still cannot find Ghostscript, use this option to
  589.  set the full pathname to Ghostscript.
  590.  If you wish to specify that Ghostscript should look for its
  591.  initialisation files in a different place, modify the -I option.
  592. W
  593.  Try to keep the command length short, otherwise GSview will
  594.  have trouble printing files with Ghostscript.
  595. E
  596.  Only the Ghostscript EXE and include path may be specified -
  597.  other items will confuse GSview.
  598. 3Sounds
  599. ?Sounds
  600.  The `Sounds` option assigns sounds to various events.
  601.  For each event the sound can be set to `None`, a `Speaker Beep` or
  602.  a `Wave` file.
  603.  
  604.  You must have a sound driver loaded before using Wave files.
  605.  Wave file sounds are not available under MS-Windows 3.0.
  606.  
  607.  The events are:
  608.  
  609.  `Output Page`: the PostScript showpage operator was executed.
  610.  
  611.  `No Page`: an invalid page was selected.
  612.  For example, pressing `Prev` while on the first page of a document
  613.  with `DSC` comments.
  614.  
  615.  `No Number`: a command required page numbering and the document did
  616.  not have page numbering.
  617.  For example, pressing `Goto Page` when viewing a document without
  618.  `DSC` comments.
  619.  
  620.  `Not Open`:  a command required a document to be open and this was
  621.  not the case.
  622.  For example, pressing `Goto Page` when no document is open.
  623.  
  624.  `Error`: many types of errors.
  625.  
  626.  `Timeout`: no response from Ghostscript within a timeout period.
  627.  For example, display snowflak.ps on a PC with a 286-12 CPU.
  628.  
  629.  `Start`: GSview opened.
  630.  
  631.  `Exit`: GSview closed.
  632.  
  633.  The defaults are for `No Page` and `Error` to be a `Speaker Beep`
  634.  and all other events to be `None`.
  635. 3Units
  636. ?Units
  637.  The `Units` option sets the units used to display the cursor location
  638.  on the status bar.  Available units are PostScript points (`pt` = 1/72"),
  639.  millimetres (`mm`) and inches (`in`).
  640.  The default is `pt`.
  641. 3Save Settings
  642. ?Save Settings
  643. ?Settings
  644. ?INI file
  645. ?Save Settings on Exit
  646.  The `Save Settings` option saves the GSview window position,
  647.  window size, last used printer, last directory,
  648.  `Sounds`, `Units`, `Save Last Directory`,
  649.  `User Defined`, `Ghostscript Command`, `Button Bar`,
  650. P
  651.  `Fit Window To Page`,
  652. E
  653.  `Quick Open`, `Auto Redisplay`, `EPS Clip`, `EPS Warn`, `Ignore DSC`,
  654.  `Depth`, `Orientation`, `Media`, `Resolution` and `Zoom Resolution`
  655.  options to the initialisation file
  656. W
  657.  gsview.ini in the Windows system directory.
  658. P
  659.  gvpm.ini in the OS/2 system directory.
  660. E
  661.  GSview reads this file during startup.
  662.  
  663.  When the `Save Settings on Exit` option is checked, GSview will
  664.  automatically save the above settings when you quit GSview.
  665. 3Safer
  666. ?Safer
  667.  When the `Safer` option is `checked`, GSview will give Ghostscript
  668.  the `-dSAFER` flag, which disables the deletefile and renamefile operators,
  669.  and the ability to open files in any mode other than read-only.
  670.  This is the default.
  671.  
  672.  When the `Safer` option is `unchecked` Ghostscript can change
  673.  files.
  674. 3Save Last Directory
  675. ?Save Last Directory
  676.  When the `Save Last Directory` option is `checked`, GSview will
  677.  save the current directory when you quit GSview.  When GSview
  678.  is started next, this will be made the current directory.
  679.  This is the default.
  680.  
  681.  When `Save Last Directory` option is `unchecked`, the current
  682.  directory when GSview is started will be the directory where
  683.  GSview is located, or the working directory specified by
  684.  the Program Manager.
  685. 3Button Bar
  686. ?Button Bar
  687. ?Magnify
  688.  When the `Button Bar` option is `checked`, GSview will display
  689.  a Button Bar down the left side of the window.  This is the default.
  690.  The Button Bar contains the following items in order from top to
  691.  bottom:
  692.  
  693.  `File` | `Open`
  694.  
  695.  `File` | `Print`
  696.  
  697.  `File` | `Info`
  698.  
  699.  `Help` | `Contents`
  700.  
  701.  `File` | `Goto Page`
  702.  
  703.  `File` | `Next Page`
  704.  
  705.  `File` | `Previous Page`
  706.  
  707.  `Go forward 5 pages`
  708.  
  709.  `Go back 5 pages`
  710.  
  711.  `Increase resolution by 1.2`
  712.  
  713.  `Decrease resolution by 1/1.2`
  714.  
  715.  `Edit` | `Find`
  716.  
  717.  `Edit` | `Find Next`
  718.  
  719.  If using the increase/decrease resolution buttons, `Auto Redisplay`
  720.  should be set.  Instead of using these buttons, it is also possible
  721.  to use the `Media` | `Resolution` command.
  722.  When the `Button Bar` option is `unchecked`, GSview will not
  723.  display the Button Bar.
  724. P
  725. 3Fit Window To Page
  726. ?Fit Window To Page
  727.  When the `Fit Window To Page` option is `checked`, GSview will
  728.  shrink the window size so that it is no larger than the page
  729.  being displayed.  This is the default.
  730.  
  731.  If `Fit Window To Page` is `unchecked`, GSview will not resize the
  732.  window and areas outside the page will be drawn in light grey.
  733.  This is useful if you do not wish the window to shrink when looking
  734.  at pages at low resolution.
  735. E
  736. 3Quick Open
  737. ?Quick Open
  738.  When the `Quick Open` option is `checked`, GSview will not reload
  739.  Ghostscript before every document, making opening of documents quicker.
  740.  
  741.  GSview tries to preserve the Ghostscript state between documents,
  742.  but a document may still leave the Ghostscript interpreter in an unusual
  743.  state or cause an error.  If an error occurs, Ghostscript will close.
  744.  Error messages are displayed in the Ghostscript window.
  745.  Select `Redisplay` to reopen the document.
  746.  
  747.  If `Quick Open` is `unchecked`, GSview will close Ghostscript and
  748.  restart it before each new document or whenever the page orientation,
  749.  resolution or size is changed.
  750. 3Auto Redisplay
  751. ?Auto Redisplay
  752.  When the `Auto Redisplay` option is `checked`, GSview will
  753.  redisplay `DSC` documents when the `Orientation`, `Resolution`,
  754.  `Depth` or `Media` are changed.
  755.  This is the default.
  756.  
  757.  If `Auto Redisplay` is `unchecked`, the `File` | `Redisplay` command
  758.  must be used to redisplay a document after changing the
  759.  `Orientation`, `Resolution`, `Depth` or `Media`.
  760. 3EPS Clip
  761. ?EPS Clip
  762.  When the `EPS Clip` option is `checked`, GSview will clip the
  763.  display bitmap to the bounding box of an EPS file instead of using the
  764.  page size specified on the `Media` menu.  This is useful when
  765.  adding a bitmap preview to an EPS file.
  766.  
  767.  If `EPS Clip` is `unchecked`, GSview will use the page size
  768.  specified on the `Media` menu for EPS files.  This is the default.
  769.  
  770.  `EPS Clip` does not alter the original document, it only affects
  771.  how much of the document is displayed by GSview.
  772.  
  773.  See also `Clipboard` | `Add EPS Preview`
  774. 3EPS Warn
  775. ?EPS Warn
  776.  When the `EPS Warn` option is `checked`, GSview will write a
  777.  prolog to Ghostscript when each file is opened.  This prolog will
  778.  produce warning messages in the Ghostscript text window if any
  779.  PostScript operators that should not be used in `EPS` files
  780.  are used.  An example warning message is:
  781.   Warning: EPS files must not use /initgraphics
  782.  `EPS Warn` is not infallible.  It is possible to access restricted
  783.  operators without `EPS Warn` producing a warning.
  784.  
  785.  The default for `EPS Warn` is `unchecked`.
  786.  
  787.  See also `PS to EPS`.
  788. 3Ignore DSC
  789. ?Ignore DSC
  790.  Some documents incorrectly claim to conform to the Adobe Document
  791.  Structuring Conventions.  Attempting to display one of these bogus
  792.  documents will probably leave GSview horribly confused and unable
  793.  to display the document.  If `Ignore DSC` is `checked`, GSview
  794.  will treat the document as if it does not contain DSC comments
  795.  and will only display the pages in the original order.
  796.  
  797.  The default for `Ignore DSC` is `unchecked`.
  798. 2Page Orientation
  799. ?Orientation
  800. ?Portrait
  801. ?Landscape
  802. ?Upside-down
  803. ?Seascape
  804. ?Swap Landscape
  805.  The `Portrait`, `Landscape`, `Upside-down` and `Seascape`
  806.  (reverse Landscape) commands on the `Orientation `Menu select
  807.  the page orientation used by the display.
  808.  `Landscape` implies a clockwise rotation of the paper by 90 degrees.
  809.  `Seascape` implies an anti-clockwise rotation of the paper by 90 degrees.
  810.  These orientation options only affect the display and do not affect
  811.  the print commands.
  812.  If a `DSC` page orientation comment is found, the orientation will be
  813.  selected automatically.
  814.  
  815.  When the `Swap Landscape` option is `checked`, GSview swaps the
  816.  meaning of Landscape and Seascape.
  817.  Most of the Landscape documents that I have encountered require a 90
  818.  clockwise rotation of the paper to view.
  819.  However, there is no standard and some documents need to be rotated
  820.  the other way.
  821.  The `Swap Landscape` button allows GSview to automatically rotate the
  822.  document the right way in response to the `%%Orientation` comment in the
  823.  PostScript file.
  824.  
  825.  See also `Page Size and Display Resolution`.
  826. 2Page Size and Display Resolution
  827. ?Page Size and Display Resolution
  828. ?Resolution
  829. ?Zoom Resolution
  830. ?Depth
  831. ?Page Size
  832. ?Media
  833. ?User Defined
  834.  The `Resolution` command on the `Media` menu selects the display
  835.  resolution in dots per inch.
  836.  The default for a VGA display is 96 dots per inch.
  837.  
  838.  For DSC conforming files, pressing the right mouse button will
  839.  zoom into the page at what is usually printer resolution.
  840.  Pressing the right mouse button a second time will zoom back out to
  841.  normal display resolution.
  842.  The `Zoom Resolution` command on the `Media` menu sets the zoom
  843.  resolution in dots per inch.
  844.  
  845.  The `Depth` sub menu on the `Media` menu selects the display
  846.  depth in bits per pixels.
  847.  
  848.  The `Media` menu also allows selection of page size.
  849.  Available page sizes are:
  850.   Letter          8.5 x 11   inch
  851.   Tabloid        11   x 17   inch
  852.   Ledger         17   x 11   inch
  853.   Legal           8.5 x 14   inch
  854.   Statement       5.5 x  8.5 inch
  855.   Executive       7.5 x 10   inch
  856.   A3              297 x 420  mm
  857.   A4              210 x 297  mm
  858.   A5              148 x 210  mm
  859.   B4              257 x 364  mm
  860.   B5              182 x 257  mm
  861.   Folio           8.5 x 13   inch
  862.   Quarto          8.5 x 10.8 inch
  863.   10x14          10   x 14   inch
  864.  
  865.  A user defined size can be specified in PostScript points (1/72 inch)
  866.  with the `User Defined` command.  A size of 480x360 points at 96 dpi
  867.  will give an image size of 640x480 pixels.
  868.  
  869.  If a `DSC` media comment is found, the page type will be selected
  870.  automatically.  If the media specification is not one of the above
  871.  page types, the `User Defined` size will be set.
  872. 2Keys
  873. ?Keys
  874.  Following are the key assignments for GSview.
  875.  
  876.  `O`, `o`  Open and display a file.  (`File` | `Open`)
  877.  
  878.  `C`, `c`  Close file.  (`File` | `Close`)
  879.  
  880.  `N`, `n`, `+`  Next Page.  (`File` | `Next Page`)
  881.  
  882.  `V`, `v`, `-`  Previous Page.  (`File` | `Previous Page`)
  883.  
  884.  `G`, `g`  Goto Page.  (`File` | `Goto Page`)
  885.  
  886.  `I`, `i`  File information.  (`File` | `Info`)
  887.  
  888.  `R`, `r`  Redisplay page.  (`File` | `Redisplay`)
  889.  
  890.  `S`, `s`  Select file: open but don't display.  (`File` | `Select File`)
  891.  
  892.  `P`, `p`  Print all or some pages to a printer.  (`File` | `Print`)
  893.  
  894.  `F`, `f`  Print all or some pages to a File.  (`File` | `Print To File`)
  895.  
  896.  `E`, `e`  Extract some pages to another File.  (`File` | `Extract`)
  897.  
  898.  `F1`  Help.  (`Help` | `Contents`)
  899.  
  900.  `Ctrl+C`, `Insert`  Copy displayed bitmap to clipboard.  (`Edit` | `Copy`)
  901.  
  902. W
  903.  `Up`  Scroll up 16 pixels.
  904.  
  905.  `Down`  Scroll down 16 pixels.
  906.  
  907.  `Left`  Scroll left one screen.
  908.  
  909.  `Right`  Scroll right one screen.
  910. P
  911.  `Arrow Keys`  Scroll by 16 pixels.
  912.  
  913.  `Ctrl+Left`  Scroll left one screen.
  914.  
  915.  `Ctrl+Right`  Scroll right one screen.
  916. E
  917.  
  918.  `Page Up`  Scroll up one screen (window height).
  919.  
  920.  `Page Down`  Scroll down one screen.
  921.  
  922.  `Home`  Scroll to top of page.
  923.  
  924.  `End`  Scroll to bottom of page.
  925. W
  926. 2Running GSview from the File Manager
  927. ?Registration Info Editor
  928. ?File Manager
  929.  To run GSview when a PostScript file is double clicked in the
  930.  File Manager, the following sequence must be followed to teach
  931.  File Manager about PostScript files.
  932.  
  933.  From the `Program Manager`, run the Registration Info Editor using
  934.  `File `| `Run...` then type `regedit`.
  935.  From the `Registration Info Editor` select `Edit `| `Add File Type...`
  936.  then enter the following fields:
  937.   Identifier = psfile
  938.   Filetype = PostScript
  939.   Action = Open
  940.   Command = gsview %1
  941.   Uses DDE = unchecked
  942.   Action = Print
  943.   Command = gsview /p %1
  944.   Uses DDE = unchecked
  945.  Then press `OK`.
  946.  
  947.  From the `File Manager`, select `File `| `Associate` then
  948.  enter the following fields:
  949.   Files with Extension = ps
  950.   Associate With = PostScript (gsview)
  951.  Then press `OK`.
  952.  
  953.  Put gsview.exe and gsview.hlp in a directory on your PATH.
  954.  That's it!  Now when you double click on a PostScript file,
  955.  the `File Manager` will run GSview.  When you drop a PostScript
  956.  file on the `Print Manager`, GSview will print the file.
  957. E
  958. 2Command line options
  959. ?Command line options
  960.  Usage:
  961. W
  962.   gsview [/D] filename
  963.   gsview [/D] /F filename
  964.   gsview [/D] /P filename
  965.   gsview [/D] /S[port] filename
  966. P
  967.   gvpm [/D] filename
  968.   gvpm [/D] /F filename
  969.   gvpm [/D] /P filename
  970. E
  971.  
  972.  To start GSview and display filename.ps use:
  973. W
  974.   gsview filename.ps
  975. P
  976.   gvpm filename.ps
  977. E
  978.  To start GSview and print filename.ps using Ghostscript
  979.  (`File` | `Print`) use:
  980. W
  981.   gsview /P filename.ps
  982. P
  983.   gvpm /P filename.ps
  984. E
  985.  To start GSview and print filename.ps to a file using Ghostscript
  986.  (`File` | `Print To File`) use:
  987. W
  988.   gsview /F filename.ps
  989. P
  990.   gvpm /F filename.ps
  991. E
  992. W
  993.  To start GSview and spool filename.ps for printing directly to
  994.  a printer (`File` | `Print File`) use:
  995.   gsview /S filename.ps
  996.  To start GSview and spool filename.ps for printing directly to
  997.  printer port LPT3: use:
  998.   gsview /SLPT3: filename.ps
  999. E
  1000.  
  1001.  To start GSview in debug mode use:
  1002. W
  1003.   gsview /D
  1004. P
  1005.   gvpm /D
  1006. E
  1007.  In debug mode GSview will `not` remove its temporary files.
  1008.  This is to allow inspection of these files after GSview has finished.
  1009.  
  1010.  GSview ignores the case of option:
  1011.  /p is the same as /P.
  1012. 2Copyright
  1013. ?Copyright
  1014.  The `About` menu item shows the GSview copyright message
  1015.  and GSview version number.
  1016.  
  1017. W
  1018.   GSVIEW.EXE - A Ghostscript graphical interface
  1019. P
  1020.   GVPM.EXE - A Ghostscript graphical interface
  1021. E
  1022.   Copyright (C) 1993, 1994, Russell Lang.  All rights reserved.
  1023.  
  1024.  This file is part of GSview.
  1025.  
  1026.  This program is distributed with NO WARRANTY OF ANY KIND.  No author
  1027.  or distributor accepts any responsibility for the consequences of using it,
  1028.  or for whether it serves any particular purpose or works at all, unless he
  1029.  or she says so in writing.  Refer to the GSview Free Public Licence
  1030.  (the "Licence") for full details.
  1031.  
  1032.  Every copy of GSview must include a copy of the Licence, normally in a
  1033.  plain ASCII text file named LICENCE.  The Licence grants you the right
  1034.  to copy, modify and redistribute GSview, but only under certain conditions
  1035.  described in the Licence.  Among other things, the Licence requires that
  1036.  the copyright notice and this notice be preserved on all copies.
  1037.  
  1038.      Author: Russell Lang
  1039.    Internet: rjl@monu1.cc.monash.edu.au
  1040. 2Common Problems
  1041. ?Common Problems
  1042. ?Problems
  1043. W
  1044.  `Problem:` Can't run gswin...
  1045.  
  1046.  GSview requires Ghostscript for Windows (gswin.exe).
  1047.  This error message usually occurs if you don't have Ghostscript
  1048.  for Windows, or if GSview can't find Ghostscript for Windows.
  1049.  
  1050.  From the GSview menu select `Options` | `Ghostscript Command`
  1051.  and enter the correct executable path and include path for Ghostscript.
  1052.  For example:
  1053.   c:\gs\gswin.exe -Ic:\gs
  1054.  
  1055.  You must set the include path for Ghostscript using either the
  1056.  `-I` command or the `GS_LIB` environment variable.
  1057.  
  1058.  Make sure you don't already have Windows Ghostscript running.
  1059.  Only one copy of Windows Ghostscript can be running at a time.
  1060.  Only one copy of GSview can be running at a time.
  1061. P
  1062.  `Problem:` Can't run gsos2...
  1063.  
  1064.  GSview requires OS/2 Ghostscript (gsos2.exe).
  1065.  This error message occurs if you don't have OS/2 Ghostscript,
  1066.  or if GSview can't find OS/2 Ghostscript.
  1067.  
  1068.  From the GSview menu select `Options` | `Ghostscript Command`
  1069.  and enter the correct executable path and include path for Ghostscript.
  1070.  For example:
  1071.   c:\gs\gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  1072.  
  1073.  You must set the include path for Ghostscript using either the
  1074.  `-I` command or the `GS_LIB` environment variable.
  1075. E
  1076.  
  1077.  `Problem:` Ghostscript starts and then immediately exits with error code 1.
  1078.  
  1079. W
  1080.  Read the error message in the Ghostscript window before pressing
  1081.  OK in the message box.
  1082.  
  1083. E
  1084.  Ghostscript probably couldn't find its initialisation files.
  1085.  Set the Ghostscript include path by adding `-Idirectory` to the
  1086.  command in `Options` | `Ghostscript Command`, where `directory`
  1087.  includes the name of the directory that contains the Ghostscript
  1088.  initialisation files,
  1089.  Alternatively, set the environment variable GS_LIB.
  1090.  
  1091.  Read the file use.doc that comes with Ghostscript.
  1092.  
  1093. W
  1094.  Alternatively, you may be using an incompatible version of Ghostscript.
  1095.  This version of GSview requires Ghostscript version `3.0` or later.
  1096.  If you are using an incompatible version of Ghostscript, the
  1097.  Ghostscript text window will show one of the following error messages
  1098.   undefined in ear
  1099.   undefined in XXclear
  1100.  where `XX` are a pair of garbage characters.
  1101.  
  1102.  `Problem:` Message Box says `Incompatible Windows Ghostscript`
  1103.  
  1104.  You probably have an earlier version of Ghostscript.
  1105.  Make sure you have Ghostscript version 3.0 or later.
  1106.  
  1107.  `Problem:` GSview says 'Drawing...' or 'Printing...' and shows an
  1108.  hourglass cursor.  When the cursor is moved off the GSview window
  1109.  it changes to a normal arrow.
  1110.  
  1111.  The above state is normal while GSview is waiting for Ghostscript
  1112.  to do something.  It may be that the document is very complex and
  1113.  Ghostscript is just taking a long time.  In this state it is safe to
  1114.  resize or scroll the window, but do not select any menu commands.
  1115.  
  1116.  If this is not the case then GSview probably got no response
  1117.  from Ghostscript.
  1118.  Open the Ghostscript text window and look at any error messages.
  1119.  Close Ghostscript using the Ghostscript system menu.
  1120.  If GSview is still waiting, press the GSview Open button
  1121.  (even though the cursor is still an hourglass).
  1122.  Press the 'Yes' button on the 'gsview is busy' message box.
  1123.  GSview should then revert to the non-waiting mode.
  1124.  
  1125.  `Problem:` Ghostscript displays a "Pipe error" message box.
  1126.  
  1127.  GSview could not open a temporary file.  GSview requires a temporary
  1128.  file for `piping` commands to Ghostscript.  This temporary file is
  1129.  created in the directory given by the environment variable TEMP,
  1130.  or if that is not set, in the current directory.
  1131.  `Pipe error` will result when
  1132.  
  1133.  1. TEMP is not set and the current directory is read-only.
  1134.  For example, the current directory is on a CD-ROM or a network.
  1135.  
  1136.  Solution:  Set TEMP environment variable in AUTOEXEC.BAT.
  1137.  
  1138.  2. TEMP is set but does not point to a valid read-write directory.
  1139.  
  1140.  Solution: Change TEMP to point to a directory that exists
  1141.  and is read-write.
  1142.  
  1143.  3. Disk is full.
  1144. E
  1145.  
  1146.  `Problem:` GSview says that a multipage PostScript file produced
  1147.  by MS-Windows contains 0 pages and will only show the first page.
  1148.  
  1149.  This is because the document does not have correct DSC comments.
  1150.  From the Control Panel, select `Printers`, `Options...`, then in the
  1151.  `Print to` group box click on the `Printer` radio button.  You cannot
  1152.  use the `Print To` `Encapsulated PostScript File` for printing
  1153.  multipage files.  The correct method is to connect the printer
  1154.  to `FILE:`.
  1155.  In addition,
  1156.  from the Control Panel select `Printers`, `Options...`, `Advanced` and
  1157.  then check `Conform to Adobe Document Structuring Convention`.
  1158.  
  1159.  The DSC comment `%%Pages: 0` means that the document does not produce
  1160.  any pages.  That is, the PostScript `showpage` operator is not used.
  1161.  If you find a PostScript document that has multiple pages and contains
  1162.  the `%%Pages: 0` comment, change the first line from `%!PS-Adobe-` to `%!`.
  1163.  GSview will then ignore the DSC comments and allow you to view all
  1164.  pages, but only in the original order.  Complain to the author of the
  1165.  program that produced that PostScript file.
  1166.  
  1167.  `Problem:` PostScript files produced by MS-Windows start with a Control-D.
  1168.  
  1169.  Since this occurs even when the PostScript printer
  1170.  `Conform to Document Structuring Convention`
  1171.  checkbox is checked, this must be considered a
  1172.  bug in the MS-Windows PostScript printer driver.
  1173.  The bug fix is documented in the MS-Windows PRINTERS.WRI file.
  1174.  Edit the win.ini file and search for the PostScript printer section.
  1175.  There may be more than one.  In each of these sections add
  1176.  `CTRLD=0` as shown below.
  1177.  
  1178.   [Apple LaserWriter II NT,FILE]
  1179.   CTRLD=0
  1180.  
  1181.  `Problem:` PostScript files produced by Word for Windows 6.0
  1182.  cause a "Missing %%Pages comment" message box.
  1183.  
  1184.  Congratulations.  You have just found a mistake in the DSC comments
  1185.  when Word included an EPS file.  Word should have surrounded the
  1186.  included EPS file with the lines
  1187.   %%BeginDocument: filename.eps
  1188.   %%EndDocument
  1189.  Because Word didn't do this, GSview can't tell how many pages
  1190.  are in the document and where they are located.
  1191.  
  1192.  Please complain to Microsoft.  There is a problem in the EPSIMP.FLT
  1193.  filter version 2.01 which Microsoft needs to fix.
  1194.  
  1195.  In the interim, you have two solutions:
  1196.  
  1197.  1. Select `Options` | `Ignore DSC`
  1198.  
  1199.  2. Edit the PostScript file to correct the DSC comments.
  1200.  Search the PostScript file for all lines containing
  1201.    %MSEPS Preamble
  1202.  From each of these lines, search forward for the start of the
  1203.  included EPS file which should start with a line like
  1204.   %%PS-Adobe-3.0 EPSF-3.0
  1205.  Above these lines add the line
  1206.   %%BeginDocument: AddedByHand
  1207.  
  1208.  Then search for all lines containing
  1209.   %MSEPS Trailer
  1210.  Above these lines add the line
  1211.   %%EndDocument
  1212.  
  1213.  GSview should then be able to display the file correctly.
  1214.  
  1215.  `Problem:` Ghostscript always outputs to a printer instead of the
  1216.  GSview window.
  1217.  
  1218.  You must not use the GS_DEVICE environment variable.
  1219. W
  1220.  
  1221.  `Problem:` Ghostscript displays a message box "pipe overflow".
  1222.  
  1223.  The document may contain incorrect DSC comments.
  1224.  
  1225.  You must wait until Ghostscript is not busy before attempting to
  1226.  display another page.  Exit and then restart GSview.
  1227. E
  1228. 2Internals
  1229. ?Internals
  1230. W
  1231.  The preferred method for driving Ghostscript would be to start it
  1232.  as a child process and then to send it PostScript code through a pipe.
  1233.  Windows 3.1 supports neither child processes nor pipes.
  1234.  
  1235.  GSview interacts with Ghostscript by sending messages between
  1236.  the GSview and Ghostscript windows.
  1237.  GSview creates an imitation pipe to Ghostscript by writing
  1238.  into a shareable global memory block and then passing the handle
  1239.  to Ghostscript.
  1240.  
  1241.  GSview starts Ghostscript for displaying using
  1242.   gswin -dBitsPerPixel=x -dSAFER -rXDPIxYDPI -gWIDTHxHEIGHT -sGSVIEW=xxxx -
  1243.  where xxxx is the handle to the GSview window.
  1244.  Ghostscript then tells GSview the handle to the text window by sending
  1245.  a message WM_USER with wParam HWND_TEXT=0 to the GSview window.
  1246.  Instead of creating another window for the image, Ghostscript
  1247.  creates a child window of the GSview window for displaying
  1248.  the bitmap. Ghostscript tells GSview the handle to this child
  1249.  image window by sending a message WM_USER with wParam
  1250.  HWND_IMGCHILD=1.
  1251.  
  1252.  Ghostscript also sends WM_USER messages to GSview with wParam
  1253.  GSWIN_CLOSE=2 when it is exiting,
  1254.  SYNC_OUTPUT=3 when the image needs to be redrawn (win_sync_output),
  1255.  OUTPUT_PAGE=4 when a page is to be output (win_output_page),
  1256.  SCROLL_POSITION=5 when the window is scrolled,
  1257.  PIPE_DATA=6 for passing the handle to a global memory block (in
  1258.  lParam) for the imitation pipe,
  1259.  BEGIN=7 when "-1 false .outputpage" is executed and
  1260.  END=8 when "-2 false .outputpage" is executed.
  1261.  
  1262.  When Ghostscript sends the OUTPUT_PAGE command it waits until it
  1263.  receives a NEXT_PAGE command from GSview.
  1264.  
  1265.  GSview sends WM_USER messages to the Ghostscript Image window with
  1266.  wParam NEXT_PAGE=10 when it is time to move to the next page and
  1267.  COPY_CLIPBOARD=11 when the bitmap should be copied to the clipboard.
  1268.  GSview sends WM_USER messages to the Ghostscript Text window with
  1269.  wParam PIPE_REQUEST=12 when it wants more pipe data.
  1270.  
  1271.  GSview uses temporary files of the name gsviewXX.XXX in the
  1272.  directory given by the TEMP environment variable.
  1273.  Keep TEMP short to avoid the gswin command line exceeding 128 characters.
  1274.  
  1275.  GSview starts Ghostscript for printing using
  1276.   gswin -sGSVIEW=xxxx @optfile
  1277.  optfile contains
  1278.   -dNOPAUSE
  1279.   -dSAFER
  1280.   -sDEVICE=devname
  1281.   -rXDPIxYDPI
  1282.   -gWIDTHxHEIGHT
  1283.   -sOutputFile=outfilename
  1284.   filename.ps
  1285.   quit.ps
  1286.  
  1287. P
  1288.  GSview starts Ghostscript for displaying using
  1289.   gsos2 -dBitsPerPixel=x -dSAFER -rXDPIxYDPI -gWIDTHxHEIGHT -sGSVIEW=xxxx -
  1290.  where xxxx is a string used to access a named shareable memory block,
  1291.  two semaphores and a queue.  These are listed in gdevpm.h.
  1292.  The shareable memory block contains a bitmap in BMP format.
  1293.  The SYNC semaphore is not used (it is used by gspmdrv.exe instead).
  1294.  The NEXT semaphore is used when waiting at each showpage.
  1295.  The MUTEX is used to sychronise access to the bitmap.
  1296.  The QUEUE is used by Ghostscript to notify GSview about the
  1297.  following significant events:  1. Starting to draw into bitmap,
  1298.  2. Synchronise (redraw) page, 3. showpage (redraw page),
  1299.  4. Ghostscript is closing, 5. Ghostscript fatal error,
  1300.  6. Palette in bitmap has changed,
  1301.  7. "-1 false .outputpage" is executed,
  1302.  8. "-2 false .outputpage" is executed.
  1303.  PostScript code is piped to the Ghostscript stdin.
  1304.  Ghostscript stdout goes to a window.
  1305.  
  1306.  GSview uses temporary files of the name gvXXXXXX in the
  1307.  directory given by the TEMP environment variable.
  1308.  
  1309.  GSview starts Ghostscript for printing using
  1310.   gsos2 @optfile
  1311.  optfile contains
  1312.   -dNOPAUSE
  1313.   -dSAFER
  1314.   -sDEVICE=devname
  1315.   -rXDPIxYDPI
  1316.   -gWIDTHxHEIGHT
  1317.   -sOutputFile=outfilename
  1318.   filename.ps
  1319.   quit.ps
  1320.  
  1321. E
  1322.